require 'watir'
include Watir
require 'test/unit'
class TC_blogsFrontEnd < Test::Unit::TestCase
  	def test_25_createNewBlogWithoutURLOrName_Blogs

      $ie.goto($UniVar)

  #Test Specifics
	$ie.goto($UniVar + '/controlpanel/BlogAdmin/sectionedit.aspx')
    $ie.text_field(:index, 1).set('watir blog')
#    $ie.text_field(:index, 2).set('watirblog')
    $ie.text_field(:index, 3).set($ADMIN)  
	$ie.link(:text, 'Save').click

  $ie.link(:text, 'watir blog')
  assert($ie.contains_text('watir_blog'))

  #Delete Blog      
  $ie.goto($UniVar + '/controlpanel/BlogAdmin/Blogs.aspx')
  $ie.wait()
  $ie.link(:text, 'Delete').click_no_wait
  hwnd = $ie.enabled_popup(20)
    if(hwnd)
      w = WinClicker.new
      w.clickWindowsButton_hwnd(hwnd, "OK")
    end

	end
end